﻿using L.EntityFramework;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace L.EntityModel
{
    [Table("Product_Batch")]
  public  class Product_Batch:BaseEntity
    {

        /// <summary>
        ///  
        /// </summary>
        [Key]
        public int? Id { get; set; }
        [NotMapped]
        public string ProductName { get; set; }
        [NotMapped]
        public string EnterpriseName { get; set; }
        [NotMapped]
        public string MaterialName { get; set; }
        /// <summary>
        ///  删除状态0未删除1已删除
        /// </summary>
        public int ViewDel
        {
            get;
            set;
        }

        /// <summary>
        ///  上市时间
        /// </summary>
        public DateTime? TimeToMarket
        {
            get;
            set;
        }


        /// <summary>
        ///  生产日期
        /// </summary>
        public DateTime? ProductionDate
        {
            get;
            set;
        }


        /// <summary>
        ///  公司id
        /// </summary>
        public int EnterpriseId
        {
            get;
            set;
        }

        /// <summary>
        ///  批次绑定素材id
        /// </summary>
        public int? MaterialId
        {
            get;
            set;
        }

        /// <summary>
        ///  公共类型id
        /// </summary>
        public int? CommonId
        {
            get;
            set;
        }

        /// <summary>
        ///  批次名称
        /// </summary>
        public string BatchName
        {
            get;
            set;
        }
        /// <summary>
        /// 产品主图
        /// </summary>
        
        [NotMapped]
        public string ImageUrl1 { get; set; }


        /// <summary>
        /// 模板节点ID
        /// </summary>
        public string TempletId
        {
            get;
            set;
        }


        /// <summary>
        /// 模板节点名称
        /// </summary>
        [NotMapped]
        public string TempletName { get; set; }

        /// <summary>
        ///  
        /// </summary>
        public string QRCode
        {
            get;
            set;
        }

        /// <summary>
        ///  商品名称
        /// </summary>
        public int ProductId
        {
            get;
            set;
        }

        /// <summary>
        ///  视频地址
        /// </summary>
        public string VideoUrl
        {
            get;
            set;
        }

        /// <summary>
        ///  备注
        /// </summary>
        public string Remark
        {
            get;
            set;
        }

        /// <summary>
        ///  排序
        /// </summary>
        public int? Sequence
        {
            get;
            set;
        }

        /// <summary>
        ///  修改登录id
        /// </summary>
        public int ChangeLoginID
        {
            get;
            set;
        }

        /// <summary>
        ///  修改登录名
        /// </summary>
        public string ChangeLoginName
        {
            get;
            set;
        }

        /// <summary>
        ///  修改时间
        /// </summary>
        public System.DateTime ChangeDate
        {
            get;
            set;
        }

        /// <summary>
        ///  信息展示类别1溯源节点0微页面
        /// </summary>
        public int? ShowType
        {
            get;
            set;
        }

        [NotMapped]
        public DateTime? CreateDate { get; set; }

        public int Version { get; set; }


        public int? IsNewMaterial
        {
            get;
            set;
        }

        public int ProductBindType
        {
            get;
            set;
        }


        [NotMapped]
        public string ProductionDateStr
        {
            get
            {
                return Convert.ToDateTime(ProductionDate).ToString("d");
            }
            set
            {
            }
        }

        [NotMapped]
        public string TimeToMarketStr
        {
            get
            {
                return Convert.ToDateTime(TimeToMarket).ToString("d");
            }
            set
            {
            }
        }


    }



}
